<?php  
class ImagesController extends AppController 
{ 
    var $name = 'Images'; 
    var $components = array('Thumb'); 
    var $uses = array('Image'); 

     
    function add(){ 
        if(!empty($this->data)){ 
            if($this->data['Image']['thumbnail']['size']){ 
                pr($this->data); 
                if(!$this->Thumb->generateThumb('thumbnail','Image')){ 
                    pr($this->Thumb->errors); 
                }             
            } 
        } 
    } 
     
} 
?>